package com.tianma315.core.codes.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.tianma315.core.codes.dao.CodesDao;
import com.tianma315.core.codes.domain.CodesDO;
import com.tianma315.core.codes.service.CodesService;
import com.tianma315.core.common.base.CoreServiceImpl;
import org.springframework.stereotype.Service;


/**
 * 
 * <pre>
 * 
 * </pre>
 * <small> 2019-09-02 16:18:34 | Wen</small>
 */
@Service
public class CodesServiceImpl extends CoreServiceImpl<CodesDao, CodesDO> implements CodesService {


    @Override
    public CodesDO getCodesByFwCode(String fwCode) {
        EntityWrapper entityWrapper = new EntityWrapper();
        entityWrapper.eq("fw_code",fwCode);
//        entityWrapper.eq("merchant_id",merchantId);
        CodesDO codesDO = selectOne(entityWrapper);
        return codesDO;
    }

    @Override
    public CodesDO getCodesBySmallCode(String smallCode) {
        EntityWrapper entityWrapper = new EntityWrapper();
        entityWrapper.eq("small_code",smallCode);
        CodesDO codesDO = selectOne(entityWrapper);
        return codesDO;
    }
}
